import { http } from "@/utils/http/index";

export const getOrientation = (params?: any) => {
  return http.request<any>("get", "/orientation/getOrientation", { params });
};

export const getAllStage = (params?: any) => {
  return http.request<any>("get", "/stage/getAllStage", { params });
};

export const getStageAndCourseByOrientationId = (params?: any) => {
  return http.request<any>("get", "/stage/getStageAndCourseByOrientationId", {
    params
  });
};

export const addCourse = (data?: any) => {
  return http.request<any>("post", "/course/addCourse", {
    data
  });
};

export const getAllVideoByCourseId = (params?: any) => {
  return http.request<any>("get", "/course/getAllVideoByCourseId", {
    params
  });
};

export const getCourseDetailById = (params?: any) => {
  return http.request<any>("get", "/course/getCourseDetailById", {
    params
  });
};

export const getFeedbackListByCourseId = (params?: any) => {
  return http.request<any>("get", "/course/getFeedbackListByCourseId", {
    params
  });
};

export const getStudentStageAndCourseByOrientationId = (params?: any) => {
  return http.request<any>(
    "get",
    "/stage/getStudentStageAndCourseByOrientationId",
    {
      params
    }
  );
};

export const addFeedback = (data?: any) => {
  return http.request<any>("post", "/feedback/addFeedback", {
    data
  });
};

export const addVideoReq = (data?: any) => {
  return http.request<any>("post", "/video/addVideo", {
    data
  });
};

export const addCourseComment = (data?: any) => {
  return http.request<any>("post", "/course/addCourseComment", {
    data
  });
};

export const getCourseCommentList = (params?: any) => {
  return http.request<any>("get", "/course/getCourseCommentList", {
    params
  });
};

export const getUserHaveCourse = (params?: any) => {
  return http.request<any>("get", "/course/getUserHaveCourse", {
    params
  });
};

export const addUserCourse = (params?: any) => {
  return http.request<any>("post", "/course/addUserCourse", {
    params
  });
};

export const cancelUserCourse = (params?: any) => {
  return http.request<any>("delete", "/course/cancelUserCourse", {
    params
  });
};

export const courseLearnData = (params?: any) => {
  return http.request<any>("get", "/course/courseLearnData", {
    params
  });
};
